Skip to content

Comments

added strings#25

Open
niv789 wants to merge 3 commits intofreeCodeCampGuam:masterfrom
niv789:master
Open

added strings#25
niv789 wants to merge 3 commits intofreeCodeCampGuam:masterfrom
niv789:master

Conversation

@niv789
Copy link

@niv789 niv789 commented Oct 2, 2019

No description provided.

@niv789
Copy link
Author

niv789 commented Oct 2, 2019

strings intro

Copy link
Collaborator

@Chovin Chovin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @niv789 , thanks for the contribution!
Could you change a few things before I merge it though? I notice you put every paragraph in its own
```
code block
```
This kind of makes it hard to read and may make people confused since only code was in code blocks in the rest of the page. It also stops the "Go back" link from working.

I like that you're going a bit deeper in depth! This page had only briefly skimmed Strings before. It did however suggest some of the things you've mentioned in these changes. Could you move this section up nearer to where strings are talked about? That way it may be more obvious that you're expounding on those ideas.

```
```
Python String
In Python, Strings are arrays of bytes representing Unicode characters. However, Python does not have a character data type, a single character is simply a string with a length of 1. Square brackets can be used to access elements of the string.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you provide an example of using square brackets to access elements of a string? Also, maybe change "elements" to something else, something that makes sense that the elements you're accessing are either single characters or substrings.. "P

print("\nString with the use of Double Quotes: ")
print(String1)
``` Creating a String with triple Quotes ```
String1 = '''I'm a Geek and I live in a world of "Geeks"'''
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it's important to mention why you might use these different ways of writing strings, like to avoid escaping the other set of quotes like you've demonstrated here.

Comment on lines +476 to +478
String1 = '''Geeks
For
Life'''
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you also mention that using three double quotes works as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants